<template>
  <div id="Incubation">
    <el-tabs
      :tab-position="tabPosition"
      v-model="name"
      @tab-click="handleClick"
      style="height: 100%; width: 137px"
    >
      <el-tab-pane
        name="/home/Incubation/application"
        label="入孵申请"
      ></el-tab-pane>
      <el-tab-pane
        label="评审结果"
        name="/home/Incubation/Incubation_Review_results"
      ></el-tab-pane>

      <el-tab-pane label="项目文件" name="/home/Incubation/file"></el-tab-pane>
      <el-tab-pane
        label="入驻协议"
        name="/home/Incubation/Incubation_Settlement_agreement"
      ></el-tab-pane>
      <el-tab-pane
        label="退出申请"
        name="/home/Incubation/Incubation_Withdrawal_application"
      ></el-tab-pane>
      <el-tab-pane
        label="导师申请"
        name="/home/Incubation/Incubation_Tutor_application"
      ></el-tab-pane>
    </el-tabs>
    <el-main class="Incubation_main"> <router-view></router-view></el-main>
  </div>
</template>

<script>
export default {
  props: {},
  components: {},
  data() {
    return {
      tabPosition: "left",
      name: "/home/Incubation/application",
    };
  },
  methods: {
    handleClick(tab, event) {
      this.name = tab.name;
      this.$router.push(this.name);
      window.sessionStorage.setItem("Incubation_name", this.name);
    },
  },
  created() {
    let namebox = window.sessionStorage.getItem("Incubation_name");
    if (namebox != null) {
      // console.log(namebox);
      this.name = window.sessionStorage.getItem("Incubation_name");
      this.$router.push(this.name);
    }
  },
};
</script>

<style lang="less">
#Incubation {
  // background-color: red;
  height: 100%;
  width: 100%;
  padding: 0px;
  margin: 0px;
  display: flex;
  position: relative;
  .el-tabs__item {
    height: 50px;
    //垂直居中
    line-height: 50px;
    //水平剧中
    text-align: center;
  }
}
.Incubation_main {
  position: absolute;
  left: 110px;
  right: 0;
  top: 0;
  bottom: 0;
  overflow: auto;
}
.Incubation_main::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: #fff;
}
.Incubation_main::-webkit-scrollbar {
  width: 6px;
}

.Incubation_main:hover::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}
</style>